<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编写日报</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/js/jquery.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/js/myAjax.js"></script>
    <script src="../../js/daily/writeDaily.js"></script>
</head>
<body>
<div style="display: flex;justify-content: center;  margin-top: 100px">
    <div style="width: 800px;border:3px solid #276f58; padding: 10px">
        <div style="display: flex;justify-content: center">
            <div style="margin-left: 10px">姓名：<input readonly type="text" id="name" style="height: 30px;"></div>
            <div style="margin-left: 10px">日期：<input type="text" id="writeTime" style="height: 30px;"></div>
            <div style="margin-left: 10px">班主任：
                <select id="classTeacher" style="height: 35px;width: 170px">

                </select>
            </div>
            <div style="margin-left: 10px">教练：<input type="text" id="coach" style="height: 30px;"></div>
        </div>
        <div style="margin-top: 20px">
            <div>学习内容：</div>
            <div><textarea type="text" id="content" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="margin-top: 20px">
            <div>收获：</div>
            <div><textarea type="text" id="reap" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="margin-top: 20px">
            <div>不足：</div>
            <div><textarea type="text" id="deficiency" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="margin-top: 20px">
            <div>意见反馈：</div>
            <div><textarea type="text" id="suggestion" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="line-height: 40px;margin-left: 300px">
            <input type="button"
                   value="暂时保存"style="margin-left:30px;background-color: #009E94;width:80px;height: 30px;
           border-radius:5px;margin-right: 30px;" onclick="saveDaily()">
            <input type="button" value="提交日报" onclick="submitDaily()"
                   style="border-radius: 5px;width: 80px;height: 30px; background-color: #009E94"></div>
    </div>
</div>
</body>
<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#writeTime' //指定元素
            , type: 'datetime'
            , value:new Date()
            , format: 'yyyy-MM-dd HH:mm'
        });
    });
    findName();
    function findName() {
       let username = localStorage.getItem("username");
       let result = myAjax('/u/user/findName','post',{username:username});
       $("#name").val(result.data);
    }
</script>
</html>